package com.beidasoft.web.util.elasticSearch;


/**
 * Created by hoax on 2020-12-28 09:57.
 */
//@Configuration
public class TransportClientConfig {

//    @Beanextends ElasticsearchConfigurationSupport
//    public Client elasticsearchClient() throws UnknownHostException {
//        Settings settings = Settings.builder().put("cluster.name", "elasticsearch").build();
//        TransportClient client = new PreBuiltTransportClient(settings);
//        client.addTransportAddress(new TransportAddress(InetAddress.getByName("127.0.0.1"), 9200));
//        return client;
//    }
//
//    @Bean(name = { "elasticsearchOperations", "elasticsearchTemplate" })
//    public ElasticsearchTemplate elasticsearchTemplate() throws UnknownHostException {
//        return new ElasticsearchTemplate(elasticsearchClient());
//    }
}
